
//on 函数用于绑定事件函数，emit 属性用于触发一个事件。

var events = require('events');
var emitter = new events.EventEmitter();
emitter.on('someEvent',function (arg1, arg2) {
    console.log('listener1',arg1, arg2);
})
emitter.on('someEvent',function (arg1,arg2) {
    console.log('linstener2',arg1, arg2)
})

emitter.emit('someEvent','arg1参数', 'arg2 参数');